package com.wash.shoes.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wash.shoes.entity.FactoryshelvesRackGridPo;

/**
 * 工厂格子Mapper
 */
@Mapper
public interface FactoryshelvesRackGridMapper extends BaseMapper<FactoryshelvesRackGridPo> {
    /**
     * 查询列表
     *
     * @param factoryshelvesId 货架格子id
     * @param orderNo 订单号
     * @param phone  手机号
     * @return
     */
    Page<FactoryshelvesRackGridPo> queryListByParam(IPage page, @Param("factoryshelves_id") String factoryshelvesId,
                                                    @Param("orderNo") String orderNo, @Param("phone") String phone);

    /**
     * 不带条件的分页
     * @param factoryshelvesId
     * @param lastNum
     * @param pageSize
     * @return
     */
    List<FactoryshelvesRackGridPo> queryListByParamNoParam(@Param("factoryshelves_id") String factoryshelvesId,@Param("lastNum")int lastNum,@Param("pageSize") long pageSize);

    /**
     * 根据格子id释放绑定的订单号
     * 
     * @param id 格子id
     * @return
     */
    int updateFactoryShevelsOrderIdWithId(@Param("id") String id);
}
